﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LogoUC.ascx.cs" Inherits="VCN.home.UC.LogoUC" %>
<div>
    <%VCN.App.DataAccessLayer.ImageLogoDAO imagelogoDao = new VCN.App.DataAccessLayer.ImageLogoDAO();
      System.Collections.Generic.List<VCN.App.DataTransferObjects.ImageLogo> listimagelog = imagelogoDao.selectFilter2List(0);
      if (listimagelog != null && listimagelog.Count != 0)
      {
          Boolean coanh = false;
          for (int i = 0; i < listimagelog.Count; i++)
          {
              if (listimagelog[i].Status)
              {
                  Response.Write(string.Format("<a title='{0}' href='../home/default.aspx'><img src='../home/Images/Logo/{1}'/></a>", listimagelog[i].Name, listimagelog[i].Image));
                  coanh = true;
                  break;
              }
          }
          if (!coanh)
          {
          
            %>
            <a title="Trang chủ" href="../home/default.aspx">
                <img src="../home/Images/Logo/logo.png" /></a>
            <%
        }
    }
     else
     {
    %>
    <a title="Trang chủ" href="../home/default.aspx">
        <img src="../home/Images/Logo/logo.png" /></a>
    <%
        }%>
</div>
